package com.mz.mattress.client.api.biz;

import com.mz.mattress.api.common.Result;
import com.mz.mattress.api.entity.Goods;
import com.mz.mattress.client.service.GoodsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/goods")
public class GoodsController {

    @Autowired
    private GoodsService goodsService;

    @GetMapping("/list")
    public Result<List<Goods>> list() {
        return goodsService.list();
    }

}
